With dynamic node ID assignment, when a node starts up, it randomly assigns itself an ID number. It then checks this ID against all other nodes to see if the number is already in use.
If another node signals that the number is in use, the new node will discard the number and randomly choose another.
This process of choosing a number and testing it will continue until a unique ID has been chosen.